﻿@model Olemas.ViewModels.CommentsViewModel
@foreach (var comment in Model.Comments)
{
    <div class="oneComment">
        <label class="commentHeading">Nr.@Html.DisplayFor(c => comment.Id)</label>
        <label class="commentHeading">@Html.DisplayFor(c => comment.DateWritten)</label>
        <br />
        <label class="commentUserName">@Html.DisplayFor(c => comment.UserName) kirjutas: </label>
        @Html.TextArea("commentTextBoxView", comment.CommentText, new { rows = 5, @readonly = "true" })
    </div>
}


<div id="loadNextCommentsDiv" style="display: none">
    <a id="loadNextComments">@Model.PagesRemaining</a>
</div>


<script type="text/javascript">
    Olemas.MaxPage = @Model.NumberOfPages;
    Olemas.NextPage = @Model.CurrentPage;
</script>


